package dev.alm.functioncalltooldemo.tool;

import dev.langchain4j.agent.tool.P;
import dev.langchain4j.agent.tool.Tool;

public class TicketTool {

    @Tool(name = "book_ticket", value = "根据用户提供的姓名、出发地、目的地，帮助用户订票")
    public String bookTicket(@P("姓名") String name, @P("出发地") String from, @P("目的地") String to) {
        System.out.println("正在为您预订机票...");
        System.out.println("姓名：" + name);
        System.out.println("出发地：" + from);
        System.out.println("目的地：" + to);
        return "已为您预订了" + name + "的" + from + "到" + to + "的机票";
    }
}
